package haco.syncremotefile.utils;


import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.util.List;

/**
 * @author wangyuwei
 * @history 2021-06-07 17:17
 */

@Data
@ConfigurationProperties(prefix = "sync")
@Component
@NoArgsConstructor
public class SourceConfig {

    private List<Task> tasks ;

    @Data
    @NoArgsConstructor
    public static class Task{
        private  Source  source ;
        private  Target  target ;
        @Data
        public static class Source{
            private String ip ;
            private int port ;
            private String username ;
            private String password ;
            private String type ;
            private String dir ;
            private String mode ;
            private int relativehour = 0;
        }

        @Data
        public static class Target{
            private  String dir ;
        }
    }

}
